package sf.actions;

import java.util.ArrayList;

import javax.swing.AbstractAction;

import sf.view.StandardForm;

public class SFActionManager {

	private StandardForm parentForm;

	private ArrayList<AbstractAction> actions;

	private ActionUnos unosAction;
	private ActionIzmena izmenaAction;
	private ActionBrisanje brisanjeAction;
	private ActionSearch searchAction;
	private ActionRefresh refreshAction;
	private ActionHelp helpAction;
	private ActionSelectFirst selectFirstAction;
	private ActionSelectLast selectLastAction;
	private ActionSelectNext selectNextAction;
	private ActionSelectPrevious selectPreviousAction;
	private ActionPotvrdaUnosa potvrdaUnosaAction;
	private ActionPotvrdaIzmene potvrdaIzmeneAction;
	private ActionPotvrdaPretrage potvrdaPretrageAction;
	private ActionCancel ponistiAction;
	private ActionNext nextAction;
	private ActionZoomOut zoomOutAction;

	public SFActionManager(StandardForm parentForm) {
		this.parentForm = parentForm;
		actions = new ArrayList<AbstractAction>();
		initActions();
	}

	private void initActions() {
		unosAction = new ActionUnos(parentForm);
		izmenaAction = new ActionIzmena(parentForm);
		brisanjeAction = new ActionBrisanje(parentForm);
		searchAction = new ActionSearch(parentForm);
		refreshAction = new ActionRefresh(parentForm);
		helpAction = new ActionHelp();
		selectFirstAction = new ActionSelectFirst(parentForm);
		selectLastAction = new ActionSelectLast(parentForm);
		selectNextAction = new ActionSelectNext(parentForm);
		selectPreviousAction = new ActionSelectPrevious(parentForm);
		potvrdaUnosaAction = new ActionPotvrdaUnosa(parentForm);
		potvrdaIzmeneAction = new ActionPotvrdaIzmene(parentForm);
		potvrdaPretrageAction = new ActionPotvrdaPretrage(parentForm);
		ponistiAction = new ActionCancel(parentForm);
		nextAction = new ActionNext(parentForm);
		zoomOutAction = new ActionZoomOut(parentForm);

		actions.add(unosAction);
		actions.add(izmenaAction);
		actions.add(brisanjeAction);
		actions.add(searchAction);
		actions.add(refreshAction);
		actions.add(helpAction);
		actions.add(selectFirstAction);
		actions.add(selectLastAction);
		actions.add(selectNextAction);
		actions.add(selectPreviousAction);
		actions.add(potvrdaUnosaAction);
		actions.add(potvrdaIzmeneAction);
		actions.add(potvrdaPretrageAction);
		actions.add(ponistiAction);
		actions.add(nextAction);
		actions.add(zoomOutAction);
	}

	public ActionUnos getUnosAction() {
		return unosAction;
	}

	public ActionIzmena getIzmenaAction() {
		return izmenaAction;
	}

	public ActionBrisanje getBrisanjeAction() {
		return brisanjeAction;
	}

	public ActionSearch getSearchAction() {
		return searchAction;
	}

	public ActionRefresh getRefreshAction() {
		return refreshAction;
	}

	public ActionHelp getHelpAction() {
		return helpAction;
	}

	public ActionSelectFirst getSelectFirstAction() {
		return selectFirstAction;
	}

	public ActionSelectLast getSelectLastAction() {
		return selectLastAction;
	}

	public ActionSelectNext getSelectNextAction() {
		return selectNextAction;
	}

	public ActionSelectPrevious getSelectPreviousAction() {
		return selectPreviousAction;
	}

	public ActionPotvrdaUnosa getPotvrdaUnosaAction() {
		return potvrdaUnosaAction;
	}

	public ActionPotvrdaIzmene getPotvrdaIzmeneAction() {
		return potvrdaIzmeneAction;
	}

	public ActionPotvrdaPretrage getPotvrdaPretrageAction() {
		return potvrdaPretrageAction;
	}

	public ActionCancel getPonistiAction() {
		return ponistiAction;
	}

	public ActionNext getNextAction() {
		return nextAction;
	}

	public ActionZoomOut getZoomOutAction() {
		return zoomOutAction;
	}

	public ArrayList<AbstractAction> getActions() {
		return actions;
	}
}
